# import multiprocessing
#
# class package(object):
#     _abc = 123
#
#
# def writer_proc(q):
#     a = package()
#     try:
#         q.put(a, block = False)
#     except:
#         pass
#
# def reader_proc(q):
#     try:
#         print(q.get(block = False))
#     except:
#         pass
#
# import tornado.process
# from tornado.httpserver import HTTPServer
# import tornado.web
#
#
#
# class Mch(tornado.web.RequestHandler):
#     def get(self):
#         pipe = self.application.settings["pip"]
#         pipe.put("cccccc")
#         self.write("fffffff")
#
#
#
# if __name__ == '__main__':
#     q = multiprocessing.Queue()
#     writer = multiprocessing.Process(target=writer_proc, args=(q,))
#     writer.start()
#
#     reader = multiprocessing.Process(target=reader_proc, args=(q,))
#     reader.start()
#     # reader.join()
#     # writer.join()
#     settings = {"pip": q}
#     app = tornado.web.Application([
#         (r'/dbapi/', Mch),
#
#         # (r'/test', testHandler)
#     ], **settings)
#     server = HTTPServer(app)
#     # 23 test
#     server.bind(8888)
#     # 58
#     # server.bind(8888)
#     server.start(1)  # Forks multiple sub-processes
#     tornado.ioloop.IOLoop.current().start()
#     print("aaaaa")
